package com.hnhs.mapper;

import com.hnhs.annotaion.PageX;
import com.hnhs.model.Category;
import com.hnhs.model.CategoryQuery;
import com.hnhs.model.Product;
import com.hnhs.model.ProductQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductDao {
    @PageX
    public List<Product> select(ProductQuery query);

    int insert(Product product);
    int update(Product product);

    //软删除 逻辑删除 只改状态不删除数据
    int updateStatus(@Param("id") Integer id,@Param("status") Integer status);
}
